package com.example.system.domain.question.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;


@Getter
@Setter
@JsonInclude(JsonInclude.Include.NON_NULL)
public class QuestionVO {
    //题目id,加上这个注解是为了转为String类型，为了返回的时候，前端不截断，因为前端不能接收Long那么大类型的整型
    @JsonSerialize(using = ToStringSerializer.class)
    private Long questionId;

    //题目标题
    private String title;

    //题目难度
    private Integer difficulty;

    //题目创建人昵称
    private String createName;

    //题目创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
}
